package com.vini.web;

import java.util.List;

import org.apache.wicket.Session;
import org.apache.wicket.protocol.http.WebSession;
import org.apache.wicket.request.Request;

import com.vini.core.ec.Company;
import com.vini.core.ec.User;
import com.vini.core.ec.Vehicle;

public class AppSession extends WebSession {

	private static final long serialVersionUID = 1L;

	private User user;
	private Company company;
	private List<Vehicle> vehicles;

	public AppSession(Request request) {
		super(request);
	}

	public static AppSession get() {
		return (AppSession)Session.get();
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public void removeUser() {
		this.user = null;

	}

	public Company getCompany() {
		return company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	public void setVehicles(List<Vehicle> vehicles) {
		this.vehicles = vehicles;
	}

	public List<Vehicle> getVehicles(){
		return this.vehicles;
	}


}
